<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<!-- Mirrored from www.wolfssl.com/wolfSSL/Docs-wolfssl-manual-3-getting-started.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:30:02 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Generator" content="iWeb 3.0.4"/>
<meta name="iWeb-Build" content="local-build-20170103"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<meta name="viewport" content="width=770"/>
<title>wolfSSL - Docs | wolfSSL Manual - Chapter 3 (Getting Started)</title>
<link rel="stylesheet" type="text/css" media="screen,print" href="Docs-wolfssl-manual-3-getting-started_files/Docs-wolfssl-manual-3-getting-started.css"/>
<!--[if lt IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Docs-wolfssl-manual-3-getting-started_files/Docs-wolfssl-manual-3-getting-startedIE.css'/><![endif]-->
<!--[if gte IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Media/IE8.css'/><![endif]-->
<script type="text/javascript" src="Scripts/iWebSite.js"></script>
<script type="text/javascript" src="Docs-wolfssl-manual-3-getting-started_files/Docs-wolfssl-manual-3-getting-started.js"></script>
<meta name="description" content="Getting started with the wolfSSL embedded SSL library, including SSL examples and SSL benchmarking."/><meta name="keywords" content="embedded ssl, ssl library, open source ssl, openssl alternative, openssl replacemnt, tls 1.2, ssl, dtls, linux ssl, windows ssl, portable ssl, embedded device security, small openssl, smart grid, connected home, ecc, lightweight ssl, suite b, encryption security software, ssl inspection"/><meta name="robots" content="follow,index"/> <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','../../www.google-analytics.com/analytics.js','ga');ga('create','UA-64826966-1','auto');ga('send','pageview');</script>
 
<script>//<![CDATA[
window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("../../assets.zendesk.com/embeddable_framework/main.js","wolfssl.zendesk.com");
//]]></script>
  </head>
<body style="background: rgb(255, 255, 255); margin: 0pt; " onload="onPageLoad();">
<div style="text-align: center; ">
<div style="margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; overflow: hidden; position: relative; word-wrap: break-word;  background: rgb(255, 255, 255); text-align: left; width: 770px; " id="body_content">
<div style="float: left; margin-left: 0px; position: relative; width: 770px; z-index: 0; " id="nav_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div style="clear: both; height: 0px; line-height: 0px; " class="spacer"> </div>
</div>
<div style="float: left; height: 0px; line-height: 0px; margin-left: 0px; position: relative; width: 770px; z-index: 10; " id="header_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
</div>
<div style="margin-left: 0px; position: relative; width: 770px; z-index: 5; " id="body_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id1" style="height: 38px; left: 375px; position: absolute; top: 157px; width: 361px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_361_38" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style">wolfSSL Manual</p>
</div>
</div>
</div>
<div id="id2" style="height: 8675px; left: 36px; position: absolute; top: 281px; width: 701px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content style_External_701_8675" style="padding: 0px; ">
<div class="style">
<p style="padding-top: 0pt; " class="paragraph_style_1">Chapter 3: Getting Started<span style="line-height: 18px; " class="style_1"><br/></span></p>
<p class="paragraph_style_2"><span class="style_2"><br/></span></p>
<p class="paragraph_style_2"><br/></p>
<p class="paragraph_style_2">3.1 General Description<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">wolfSSL, formerly CyaSSL, is about 10 times smaller than yaSSL and up to 20 times smaller than OpenSSL when using the compile options described in Chapter 2. User benchmarking and feedback also reports dramatically better performance from wolfSSL vs. OpenSSL in the vast majority of standard SSL operations.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">For instructions on the build process please see <a title="Docs-wolfssl-manual-2-building-wolfssl.html" href="Docs-wolfssl-manual-2-building-wolfssl.html">Chapter 2</a>.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.2 Testsuite<span style="line-height: 15px; " class="style_3"><br/></span></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">The testsuite program is designed to test the ability of wolfSSL and its cryptography library, wolfCrypt, to run on the system.  <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">wolfSSL needs all examples and tests to be run from the wolfSSL home directory.  This is because it finds certs and keys from ./certs.  To run testsuite, execute:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">./testsuite/testsuite.test<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">or <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><span class="style_4">make test</span><span style="line-height: 13px; " class="style_5"> </span>   (when using autoconf)<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">On *nix or Windows the examples and testsuite will check to see if the current directory is the source directory and if so, attempt to change to the wolfSSL home directory.  This should work in most setup cases, if not, just use the first method above and specify the full path.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">On a successful run you should see output like this, with additional output for unit tests and cipher suite tests:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">MD5      test passed!<br/></p>
<p class="paragraph_style_4">SHA      test passed!<br/></p>
<p class="paragraph_style_4">SHA-224  test passed!<br/></p>
<p class="paragraph_style_4">SHA-256  test passed!<br/></p>
<p class="paragraph_style_4">SHA-384  test passed!<br/></p>
<p class="paragraph_style_4">SHA-512  test passed!<br/></p>
<p class="paragraph_style_4">HMAC-MD5 test passed!<br/></p>
<p class="paragraph_style_4">HMAC-SHA test passed!<br/></p>
<p class="paragraph_style_4">HMAC-SHA224 test passed!<br/></p>
<p class="paragraph_style_4">HMAC-SHA256 test passed!<br/></p>
<p class="paragraph_style_4">HMAC-SHA384 test passed!<br/></p>
<p class="paragraph_style_4">HMAC-SHA512 test passed!<br/></p>
<p class="paragraph_style_4">GMAC     test passed!<br/></p>
<p class="paragraph_style_4">Chacha   test passed!<br/></p>
<p class="paragraph_style_4">POLY1305 test passed!<br/></p>
<p class="paragraph_style_4">ChaCha20-Poly1305 AEAD test passed!<br/></p>
<p class="paragraph_style_4">AES      test passed!<br/></p>
<p class="paragraph_style_4">AES-GCM  test passed!<br/></p>
<p class="paragraph_style_4">RANDOM   test passed!<br/></p>
<p class="paragraph_style_4">RSA      test passed!<br/></p>
<p class="paragraph_style_4">DH       test passed!<br/></p>
<p class="paragraph_style_4">ECC      test passed!<br/></p>
<p class="paragraph_style_4">SSL version is TLSv1.2<br/></p>
<p class="paragraph_style_4">SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384<br/></p>
<p class="paragraph_style_4">SSL version is TLSv1.2<br/></p>
<p class="paragraph_style_4">SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384<br/></p>
<p class="paragraph_style_4">Client message: hello wolfssl!<br/></p>
<p class="paragraph_style_4">Server response: I hear you fa shizzle!<br/></p>
<p class="paragraph_style_4">sending server shutdown command: quit!<br/></p>
<p class="paragraph_style_4">client sent quit command: shutting down!<br/></p>
<p class="paragraph_style_4">ciphers = DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305-OLD:ECDHE-ECDSA-CHACHA20-POLY1305-OLD:DHE-RSA-CHACHA20-POLY1305-OLD<br/></p>
<p class="paragraph_style_4">33bc1a4570f4f1abccd5c48aace529b01a42ab51293954a297796e90d20970f0  input<br/></p>
<p class="paragraph_style_4">33bc1a4570f4f1abccd5c48aace529b01a42ab51293954a297796e90d20970f0  /tmp/output-7Iyhbo<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">All tests passed!<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">This indicates that everything is configured and built correctly. If any of the tests fail, make sure the build system was set up correctly. Likely culprits include having the wrong endianness or not properly setting the 64-bit type. If you've set anything to the non-default settings try removing those, rebuilding wolfSSL, and then re-testing.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.3 Client Example<span style="line-height: 15px; " class="style_3"><br/></span></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">You can use the client example found in examples/client to test wolfSSL against any SSL server. To see a list of available command line runtime options, run the client with the “--help” argument:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_5">./examples/client/client --help<br/></p>
<p class="paragraph_style_4">client 3.9.10 NOTE: All files relative to wolfSSL home dir<br/></p>
<p class="paragraph_style_4">-?          Help, print this usage<br/></p>
<p class="paragraph_style_4">-h &lt;host&gt;   Host to connect to, default 127.0.0.1<br/></p>
<p class="paragraph_style_4">-p &lt;num&gt;    Port to connect on, not 0, default 11111<br/></p>
<p class="paragraph_style_4">-v &lt;num&gt;    SSL version [0-3], SSLv3(0) - TLS1.2(3)), default 3<br/></p>
<p class="paragraph_style_4">-V          Prints valid ssl version numbers, SSLv3(0) - TLS1.2(3)<br/></p>
<p class="paragraph_style_4">-l &lt;str&gt;    Cipher suite list (: delimited)<br/></p>
<p class="paragraph_style_4">-c &lt;file&gt;   Certificate file,           default ./certs/client-cert.pem<br/></p>
<p class="paragraph_style_4">-k &lt;file&gt;   Key file,                   default ./certs/client-key.pem<br/></p>
<p class="paragraph_style_4">-A &lt;file&gt;   Certificate Authority file, default ./certs/ca-cert.pem<br/></p>
<p class="paragraph_style_4">-Z &lt;num&gt;    Minimum DH key bits,        default 1024<br/></p>
<p class="paragraph_style_4">-b &lt;num&gt;    Benchmark &lt;num&gt; connections and print stats<br/></p>
<p class="paragraph_style_4">-B &lt;num&gt;    Benchmark throughput using &lt;num&gt; bytes and print stats<br/></p>
<p class="paragraph_style_4">-s          Use pre Shared keys<br/></p>
<p class="paragraph_style_4">-t          Track wolfSSL memory use<br/></p>
<p class="paragraph_style_4">-d          Disable peer checks<br/></p>
<p class="paragraph_style_4">-D          Override Date Errors example<br/></p>
<p class="paragraph_style_4">-e          List Every cipher suite available,<br/></p>
<p class="paragraph_style_4">-g          Send server HTTP GET<br/></p>
<p class="paragraph_style_4">-u          Use UDP DTLS, add -v 2 for DTLSv1, -v 3 for DTLSv1.2 (default)<br/></p>
<p class="paragraph_style_4">-m          Match domain name in cert<br/></p>
<p class="paragraph_style_4">-N          Use Non-blocking sockets<br/></p>
<p class="paragraph_style_4">-r          Resume session<br/></p>
<p class="paragraph_style_4">-w          Wait for bidirectional shutdown<br/></p>
<p class="paragraph_style_4">-M &lt;prot&gt;   Use STARTTLS, using &lt;prot&gt; protocol (smtp)<br/></p>
<p class="paragraph_style_4">-f          Fewer packets/group messages<br/></p>
<p class="paragraph_style_4">-x          Disable client cert/key loading<br/></p>
<p class="paragraph_style_4">-X          Driven by eXternal test case<br/></p>
<p class="paragraph_style_4">-n          Disable Extended Master Secret<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">To test against example.com:443 try the following.  This is using wolfSSL compiled with the <span class="style_6">--enable-opensslextra --enable-supportedcurves</span> build options:<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_5">./examples/client/client -h example.com -p 443 -d -g<br/></p>
<p class="paragraph_style_4">peer's cert info:<br/></p>
<p class="paragraph_style_4"> issuer : /C=US/O=DigiCert Inc/OU=<a title="http://www.digicert.com/CN=DigiCert" href="http://www.digicert.com/CN=DigiCert">www.digicert.com/CN=DigiCert</a> SHA2 High Assurance Server CA<br/></p>
<p class="paragraph_style_4"> subject: /C=US/ST=California/L=Los Angeles/O=Internet Corporation for Assigned Names and Numbers/OU=Technology/CN=<a title="http://www.example.org" href="http://www.example.org/">www.example.org</a><br/></p>
<p class="paragraph_style_4"> altname = <a title="http://www.example.net" href="http://www.example.net/">www.example.net</a><br/></p>
<p class="paragraph_style_4"> altname = <a title="http://www.example.edu" href="http://www.example.edu/">www.example.edu</a><br/></p>
<p class="paragraph_style_4"> altname = <a title="http://www.example.com" href="http://www.example.com/">www.example.com</a><br/></p>
<p class="paragraph_style_4"> altname = example.org<br/></p>
<p class="paragraph_style_4"> altname = example.net<br/></p>
<p class="paragraph_style_4"> altname = example.edu<br/></p>
<p class="paragraph_style_4"> altname = example.com<br/></p>
<p class="paragraph_style_4"> altname = <a title="http://www.example.org" href="http://www.example.org/">www.example.org</a><br/></p>
<p class="paragraph_style_4"> serial number:0e:64:c5:fb:c2:36:ad:e1:4b:17:2a:eb:41:c7:8c:b0<br/></p>
<p class="paragraph_style_4">SSL version is TLSv1.2<br/></p>
<p class="paragraph_style_4">SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256<br/></p>
<p class="paragraph_style_4">Client Random : 83083A1D84404E66C86D7560A2C6ACEEEB0C35F94FDD5E07BC7507CD4E273B19<br/></p>
<p class="paragraph_style_4">SSL connect ok, sending GET...<br/></p>
<p class="paragraph_style_4">Server response: HTTP/1.0 200 OK<br/></p>
<p class="paragraph_style_4">Accept-Ranges: bytes<br/></p>
<p class="paragraph_style_4">Content-Type: text/html<br/></p>
<p class="paragraph_style_4">Date: Tue, 20 D<br/></p>
<p class="paragraph_style_4">ec 2016 22:52:00 GMT<br/></p>
<p class="paragraph_style_4">Last-Modified: Tue, 20 Dec 2016 22:33:12 GMT<br/></p>
<p class="paragraph_style_4">Server: ECS<br/></p>
<p class="paragraph_style_4"> (pae/378A)<br/></p>
<p class="paragraph_style_4">Content-Length: 94<br/></p>
<p class="paragraph_style_4">Connection: close<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">&lt;html&gt;&lt;head&gt;&lt;title&gt;edgecastcdn.net&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h1&gt;edgecastcdn.net&lt;/h1&gt;<br/></p>
<p class="paragraph_style_4">&lt;/body&gt;&lt;/html&gt;<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3">This tells the client to connect to (-h) example.com on the HTTPS port (-p) of 443 and sends a generic (-g) GET request. The (-d) option tells the client not to verify the server. The rest is the initial output from the server that fits into the read buffer.<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3">If no command line arguments are given, then the client attempts to connect to the localhost on the wolfSSL default port of 11111.  It also loads the client certificate in case the server wants to perform client authentication.<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3">The client is able to benchmark a connection when using the “-b &lt;num&gt;” argument. When used, the client attempts to connect to the specified server/port the argument number of times and gives the average time in milliseconds that it took to perform SSL_connect().  For example,<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_5">./examples/client/client -b 100<br/></p>
<p class="paragraph_style_4">SSL_connect avg took: 0.653 milliseconds<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3">If you'd like to change the default host from localhost, or the default port from 11111, you can change these settings in /wolfssl/test.h. The variables yasslIP and yasslPort control these settings. Re-build all of the examples including testsuite when changing these settings otherwise the test programs won't be able to connect to each other.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">By default, the wolfSSL example client tries to connect to the specified server using TLS 1.2.  The user is able to change the SSL/TLS version which the client uses by using the “-v” command line option.  The following values are available for this option:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">-v 0  =  SSL 3.0<br/></p>
<p class="paragraph_style_4">-v 1  =  TLS 1.0<br/></p>
<p class="paragraph_style_4">-v 2  =  TLS 1.1<br/></p>
<p class="paragraph_style_4">-v 3  =  TLS 1.2<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">A common error users see when using the example client is -155:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4"> err = -155, ASN sig error, confirm failure<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">This is typically caused by the wolfSSL client not being able to verify the certificate of the server it is connecting to.  By default, the wolfSSL client loads the yaSSL test CA certificate as a trusted root certificate.  This test CA certificate will not be able to verify an external server certificate which was signed by a different CA.  As such, to solve this problem, users either need to turn off verification of the peer (server), using the “-d” option:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">./examples/client/client -h myhost.com -p 443 -d<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">Or load the correct CA certificate into the CyaSSL client using the “-A” command line option:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">./examples/client/client -h myhost.com -p 443 -A serverCA.pem<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.4 Server Example<span style="line-height: 15px; " class="style_3"><br/></span></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">The server example demonstrates a simple SSL server that optionally performs client authentication. Only one client connection is accepted and then the server quits. The client example in normal mode (no command line arguments) will work just fine against the example server, but if you specify command line arguments for the client example, then a client certificate isn't loaded and the wolfSSL_connect() will fail (unless client cert check is disabled using the “-d” option). The server will report an error &quot;<span class="style_6">-245, peer didn't send cert</span>&quot;.  Like the example client, the server can be used with several command line arguments as well:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_5">./examples/server/server --help<br/></p>
<p class="paragraph_style_4">server 3.9.10 NOTE: All files relative to wolfSSL home dir<br/></p>
<p class="paragraph_style_4">-?          Help, print this usage<br/></p>
<p class="paragraph_style_4">-p &lt;num&gt;    Port to listen on, not 0, default 11111<br/></p>
<p class="paragraph_style_4">-v &lt;num&gt;    SSL version [0-3], SSLv3(0) - TLS1.2(3)), default 3<br/></p>
<p class="paragraph_style_4">-l &lt;str&gt;    Cipher suite list (: delimited)<br/></p>
<p class="paragraph_style_4">-c &lt;file&gt;   Certificate file,           default ./certs/server-cert.pem<br/></p>
<p class="paragraph_style_4">-k &lt;file&gt;   Key file,                   default ./certs/server-key.pem<br/></p>
<p class="paragraph_style_4">-A &lt;file&gt;   Certificate Authority file, default ./certs/client-cert.pem<br/></p>
<p class="paragraph_style_4">-R &lt;file&gt;   Create Ready file for external monitor default none<br/></p>
<p class="paragraph_style_4">-D &lt;file&gt;   Diffie-Hellman Params file, default ./certs/dh2048.pem<br/></p>
<p class="paragraph_style_4">-Z &lt;num&gt;    Minimum DH key bits,        default 1024<br/></p>
<p class="paragraph_style_4">-d          Disable client cert check<br/></p>
<p class="paragraph_style_4">-b          Bind to any interface instead of localhost only<br/></p>
<p class="paragraph_style_4">-s          Use pre Shared keys<br/></p>
<p class="paragraph_style_4">-t          Track wolfSSL memory use<br/></p>
<p class="paragraph_style_4">-u          Use UDP DTLS, add -v 2 for DTLSv1, -v 3 for DTLSv1.2 (default)<br/></p>
<p class="paragraph_style_4">-f          Fewer packets/group messages<br/></p>
<p class="paragraph_style_4">-r          Allow one client Resumption<br/></p>
<p class="paragraph_style_4">-N          Use Non-blocking sockets<br/></p>
<p class="paragraph_style_4">-S &lt;str&gt;    Use Host Name Indication<br/></p>
<p class="paragraph_style_4">-w          Wait for bidirectional shutdown<br/></p>
<p class="paragraph_style_4">-i          Loop indefinitely (allow repeated connections)<br/></p>
<p class="paragraph_style_4">-e          Echo data mode (return raw bytes received)<br/></p>
<p class="paragraph_style_4">-B &lt;num&gt;    Benchmark throughput using &lt;num&gt; bytes and print stats<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.5 EchoServer Example<span style="line-height: 15px; " class="style_3"><br/></span></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">The echoserver example sits in an endless loop waiting for an unlimited number of client connections. Whatever the client sends the echoserver echos back. Client authentication isn't performed so the example client can be used against the echoserver in all 3 modes. Four special commands aren't echoed back and instruct the echoserver to take a different action.<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="1">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">1.</span><span style="width: 5px; " class="inline-block"></span>&quot;<span class="style_6">quit</span>&quot;  If the echoserver receives the string &quot;quit&quot; it will shutdown.<br/></p>
</li>
</ol>
<p class="paragraph_style_7"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="2">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">2.</span><span style="width: 5px; " class="inline-block"></span>&quot;<span class="style_6">break</span>&quot;  If the echoserver receives the string &quot;break&quot; it will stop the current session but continue handling requests. This is particularly useful for DTLS testing.<br/></p>
</li>
</ol>
<p class="paragraph_style_7"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="3">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">3.</span><span style="width: 5px; " class="inline-block"></span>&quot;<span class="style_6">printstats</span>&quot; If the echoserver receives the string &quot;printstats&quot; it will print out statistics for the session cache.<br/></p>
</li>
</ol>
<p class="paragraph_style_7"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="4">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">4.</span><span style="width: 5px; " class="inline-block"></span>&quot;<span class="style_6">GET</span>&quot;  If the echoserver receives the string &quot;GET&quot; it will handle it as an http get and send back a simple page with the message &quot;greeting from wolfSSL&quot;.  This allows testing of various TLS/SSL clients like Safari, IE, Firefox, gnutls, and the like against the echoserver example.<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">The output of the echoserver is echoed to <span class="style_6">stdout</span> unless <span class="style_6">NO_MAIN_DRIVER</span> is defined.  You can redirect output through the shell or through the first command line argument. To create a file named output.txt with the output from the echoserver run:<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">./examples/echoserver/echoserver outupt.txt<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.6 EchoClient Example<span style="line-height: 15px; " class="style_3"><br/></span></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">The echoclient example can be run in interactive mode or batch mode with files. To run in interactive mode and write 3 strings &quot;hello&quot;, &quot;wolfssl&quot;, and &quot;quit&quot; results in:<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">./examples/echoclient/echoclient<br/></p>
<p class="paragraph_style_4">hello<br/></p>
<p class="paragraph_style_4">hello<br/></p>
<p class="paragraph_style_4">wolfssl<br/></p>
<p class="paragraph_style_4">wolfssl<br/></p>
<p class="paragraph_style_4">quit<br/></p>
<p class="paragraph_style_4">sending server shutdown command: quit!<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3">To use an input file, specify the file name on the command line as the first argument. To echo the contents of the file input.txt issue:<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">./examples/echoclient/echoclient input.txt<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3">If you want the result to be written out to a file, you can specify the output file name as an additional command line argument. The following command will echo the contents of file input.txt and write the result from the server to output.txt:<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">./examples/echoclient/echoclient input.txt output.txt<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3">The testsuite program does just that but hashes the input and output files to make sure that the client and server were getting/sending the correct and expected results.<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.7 Benchmark<span style="line-height: 15px; " class="style_3"><br/></span></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">Many users are curious about how the wolfSSL embedded SSL library will perform on a specific hardware device or in a specific environment.  Because of the wide variety of different platforms and compilers used today in embedded, enterprise, and cloud-based environments, it is hard to give generic performance calculations across the board.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">To help wolfSSL users and customers in determining SSL performance for wolfSSL / wolfCrypt, a benchmark application is provided which is bundled with wolfSSL.  wolfSSL uses the wolfCrypt cryptography library for all crypto operations by default.  Because the underlying crypto is a very performance-critical aspect of SSL/TLS, our benchmark application runs performance tests on wolfCrypt’s algorithms.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">The benchmark utility located in wolfcrypt/benchmark (./wolfcrypt/benchmar/benchmark) may be used to benchmark the cryptographic functionality of wolfCrypt. Typical output may look like the following (in this output, several optional algorithms/ciphers were enabled including HC-128, RABBIT, ECC, SHA-256, SHA-512, AES-GCM, AES-CCM, and Camellia):<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_5">./wolfcrypt/benchmark/benchmark<br/></p>
<p class="paragraph_style_4">RNG      50 megs took 0.516 seconds,   96.975 MB/s Cycles per byte =  22.57<br/></p>
<p class="paragraph_style_4">AES enc  50 megs took 0.278 seconds,  179.737 MB/s Cycles per byte =  12.18<br/></p>
<p class="paragraph_style_4">AES dec  50 megs took 0.260 seconds,  192.029 MB/s Cycles per byte =  11.40<br/></p>
<p class="paragraph_style_4">AES-GCM  50 megs took 0.840 seconds,   59.552 MB/s Cycles per byte =  36.75<br/></p>
<p class="paragraph_style_4">AES-CCM  50 megs took 0.534 seconds,   93.548 MB/s Cycles per byte =  23.39<br/></p>
<p class="paragraph_style_4">Camellia 50 megs took 0.376 seconds,  132.928 MB/s Cycles per byte =  16.46<br/></p>
<p class="paragraph_style_4">HC128    50 megs took 0.032 seconds, 1550.586 MB/s Cycles per byte =   1.41<br/></p>
<p class="paragraph_style_4">RABBIT   50 megs took 0.109 seconds,  459.559 MB/s Cycles per byte =   4.76<br/></p>
<p class="paragraph_style_4">CHACHA   50 megs took 0.144 seconds,  347.427 MB/s Cycles per byte =   6.30<br/></p>
<p class="paragraph_style_4">CHA-POLY 50 megs took 0.190 seconds,  262.978 MB/s Cycles per byte =   8.32<br/></p>
<p class="paragraph_style_4">IDEA     50 megs took 0.807 seconds,   61.982 MB/s Cycles per byte =  35.31<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">MD5      50 megs took 0.111 seconds,  452.121 MB/s Cycles per byte =   4.84<br/></p>
<p class="paragraph_style_4">POLY1305 50 megs took 0.039 seconds, 1281.392 MB/s Cycles per byte =   1.71<br/></p>
<p class="paragraph_style_4">SHA      50 megs took 0.118 seconds,  424.747 MB/s Cycles per byte =   5.15<br/></p>
<p class="paragraph_style_4">SHA-224  50 megs took 0.242 seconds,  206.789 MB/s Cycles per byte =  10.58<br/></p>
<p class="paragraph_style_4">SHA-256  50 megs took 0.243 seconds,  206.022 MB/s Cycles per byte =  10.62<br/></p>
<p class="paragraph_style_4">SHA-384  50 megs took 0.172 seconds,  290.787 MB/s Cycles per byte =   7.53<br/></p>
<p class="paragraph_style_4">SHA-512  50 megs took 0.175 seconds,  286.117 MB/s Cycles per byte =   7.65<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">scrypt   39.698 milliseconds, avg over 10 iterations<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">RSA 2048 public           0.358 milliseconds, avg over 100 iterations<br/></p>
<p class="paragraph_style_4">RSA 2048 private          4.537 milliseconds, avg over 100 iterations<br/></p>
<p class="paragraph_style_4">DH  2048 key generation   1.391 milliseconds, avg over 100 iterations<br/></p>
<p class="paragraph_style_4">DH  2048 key agreement    1.422 milliseconds, avg over 100 iterations<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">ECC  256 key generation   0.885 milliseconds, avg over 100 iterations<br/></p>
<p class="paragraph_style_4">EC-DHE   key agreement    0.874 milliseconds, avg over 100 iterations<br/></p>
<p class="paragraph_style_4">EC-DSA   sign   time      0.929 milliseconds, avg over 100 iterations<br/></p>
<p class="paragraph_style_4">EC-DSA   verify time      0.602 milliseconds, avg over 100 iterations<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">This is especially useful for comparing the public key speed before and after changing the math library. You can test the results using the normal math library (<span class="style_6">./configure</span>), the fastmath library (<span class="style_6">./configure --enable-fastmath</span>), and the fasthugemath library (<span class="style_6">./configure --enable-fasthugemath</span>).<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">For more details about benchmarking wolfSSL and wolfCrypt, please refer to the <a title="benchmarks-wolfssl.html" href="benchmarks-wolfssl.html">wolfSSL Benchmarks page</a>.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_8">3.7.1 Relative Performance<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">Although the performance of individual ciphers and algorithms will depend on the host platform, the following graph shows relative performance between wolfCrypt’s ciphers.  These tests were conducted on a Macbook Pro (OS X 10.6.8) running a 2.2 GHz Intel Core i7.<br/></p>
<p class="paragraph_style_3"><br/></p>
<div class="paragraph paragraph_style_3"><div style="height: 486px; width: 701px;  height: 486px; position: relative; width: 701px; " class="tinyText style_SkipStroke_1 inline-block"><img src="Docs-wolfssl-manual-3-getting-started_files/cipher_comp.png" alt="" style="border: none; height: 487px; width: 701px; "/></div><br/></div>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">If you want to use only a subset of ciphers, you can customize which specific cipher suites and/or ciphers wolfSSL uses when making an SSL/TLS connection.  For example, to force 128-bit AES, add the following line after the call to wolfSSL_CTX_new (SSL_CTX_new):<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">wolfSSL_CTX_set_cipher_list(ctx, “AES128-SHA”);<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_8">3.7.2 Benchmarking Notes<br/></p>
<p class="paragraph_style_3"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 15px; text-indent: -15px; " class="full-width" value="1">
<p style="text-indent: -15px; " class="paragraph_style_9"><span style="font-size: 12px; " class="Bullet">1.</span><span style="width: 5px; " class="inline-block"></span>The processors <span class="style_6">native register size</span> (32 vs 64-bit) can make a big difference when doing 1000+ bit public key operations.<br/></p>
</li>
</ol>
<p class="paragraph_style_7"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 15px; text-indent: -15px; " class="full-width" value="2">
<p style="text-indent: -15px; " class="paragraph_style_9"><span style="font-size: 12px; " class="Bullet">2.</span><span style="width: 5px; " class="inline-block"></span><span class="style_6">keygen</span> (--enable-keygen) will allow you to also benchmark key generation speeds when running the benchmark utility.<br/></p>
</li>
</ol>
<p class="paragraph_style_7"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 15px; text-indent: -15px; " class="full-width" value="3">
<p style="text-indent: -15px; " class="paragraph_style_9"><span style="font-size: 12px; " class="Bullet">3.</span><span style="width: 5px; " class="inline-block"></span><span class="style_6">fastmath</span> (--enable-fastmath) reduces dynamic memory usage and speeds up public key operations. If you are having trouble building on 32-bit platform with fastmath, disable shared libraries so that PIC isn’t hogging a register (also see notes in the README)<br/><br/><span class="style_4">./configure --enable-fastmath --disable-shared<br/>make clean<br/>make<br/></span><br/>*Note: doing a “make clean” is good practice with wolfSSL when switching configure options.<br/><br/></p>
</li>
<li style="line-height: 15px; padding-left: 15px; text-indent: -15px; " class="full-width" value="4">
<p style="text-indent: -15px; " class="paragraph_style_9"><span style="font-size: 12px; " class="Bullet">4.</span><span style="width: 5px; " class="inline-block"></span>By default, fastmath tries to use assembly optimizations if possible. If assembly optimizations don’t work, you can still use fastmath without them by adding TFM_NO_ASM to CFLAGS when building wolfSSL:<br/><br/><span class="style_4">./configure --enable-fastmath CFLAGS=DTFM_NO_ASM</span><br/><br/></p>
</li>
<li style="line-height: 15px; padding-left: 15px; text-indent: -15px; " class="full-width" value="5">
<p style="text-indent: -15px; " class="paragraph_style_9"><span style="font-size: 12px; " class="Bullet">5.</span><span style="width: 5px; " class="inline-block"></span>Using fasthugemath can try to push fastmath even more for users who are not running on embedded platforms:<br/><br/><span class="style_4">./configure --enable-fasthugemath</span><br/><br/></p>
</li>
<li style="line-height: 15px; padding-left: 15px; text-indent: -15px; " class="full-width" value="6">
<p style="text-indent: -15px; " class="paragraph_style_9"><span style="font-size: 12px; " class="Bullet">6.</span><span style="width: 5px; " class="inline-block"></span>With the default wolfSSL build, we have tried to find a good balance between memory usage and performance. If you are more concerned about one of the two, please refer back to <a title="Docs-wolfssl-manual-2-building-wolfssl.html" href="Docs-wolfssl-manual-2-building-wolfssl.html">Chapter 2</a> for additional wolfSSL configuration options.<br/><br/></p>
</li>
<li style="line-height: 15px; padding-left: 15px; text-indent: -15px; " class="full-width" value="7">
<p style="text-indent: -15px; " class="paragraph_style_9"><span style="font-size: 12px; " class="Bullet">7.</span><span style="width: 5px; " class="inline-block"></span><span class="style_6">Bulk Transfers</span>: wolfSSL by default uses 128 byte I/O buffers since about 80% of SSL traffic falls within this size and to limit dynamic memory use. It can be configured to use 16K buffers (the maximum SSL size) if bulk transfers are required.<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.7.3 Benchmarking on Embedded Systems<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">There are several build options available to make building the benchmark application on an embedded system easier.  These include:<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><span class="style_6">BENCH_EMBEDDED</span> - enabling this define will switch the benchmark application from using Megabytes to using Kilobytes, therefore reducing the memory usage.  By default, when using this define, ciphers and algorithms will be benchmarked with 25kB.  Public key algorithms will only be benchmarked over 1 iteration (as public key operations on some embedded processors can be fairly slow).  These can be adjusted in benchmark.c by altering the variables “numBlocks” and “times” located inside the BENCH_EMBEDDED define.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><span class="style_6">USE_CERT_BUFFERS_1024</span> - enabling this define will switch the benchmark application from loading test keys and certificates from the file system and instead use 1024-bit key and certificate buffers located in &lt;wolfssl_root&gt;/wolfssl/certs_test.h.  It is useful to use this define when an embedded platform has no filesystem (used with NO_FILESYSTEM) and a slow processor where 2048-bit public key operations may not be reasonable.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><span class="style_6">USE_CERT_BUFFERS_2048</span> - enabling this define is similar to USE_CERT_BUFFERS_1024 except that 2048-bit key and certificate buffers are used instead of 1024-bit ones.  This define is useful when the processor is fast enough to do 2048-bit public key operations but when there is no filesystem available to load keys and certificates from files.<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.8 Changing a Client Application to Use wolfSSL<span style="line-height: 15px; " class="style_7"><br/></span></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">This section will explain the basic steps needed to add wolfSSL to a client application, using the wolfSSL native API. For a server explanation, please see section 3.9.  A more complete walk-through with example code is located in the SSL Tutorial in <a title="Docs-wolfssl-manual-11-ssl-tutorial.html" href="Docs-wolfssl-manual-11-ssl-tutorial.html">Chapter 11</a>.  If you want more information about the OpenSSL compatibility layer, please see <a title="Docs-wolfssl-manual-13-openssl-compatibility.html" href="Docs-wolfssl-manual-13-openssl-compatibility.html">Chapter 13</a>.<br/></p>
<p class="paragraph_style_3"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="1">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">1.</span><span style="width: 5px; " class="inline-block"></span>Include the wolfSSL header<br/></p>
</li>
</ol>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">    #include &lt;wolfssl/ssl.h&gt;<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="2">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">2.</span><span style="width: 5px; " class="inline-block"></span>Change all calls from read() (or recv()) to wolfSSL_read() so<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">    result = read(fd, buffer, bytes);<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">         becomes<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">    result = wolfSSL_read(ssl, buffer, bytes);<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="3">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">3.</span><span style="width: 5px; " class="inline-block"></span>Change all calls from write (or send) to wolfSSL_write() so<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">    result = write(fd, buffer, bytes);<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_3">         becomes<br/></p>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">    result = wolfSSL_write(ssl, buffer, bytes);<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="4">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">4.</span><span style="width: 5px; " class="inline-block"></span>You can manually call wolfSSL_connect() but that's not even necessary, the first call to wolfSSL_read() or wolfSSL_write() will initiate the wolfSSL_connect() if it hasn't taken place yet.<br/></p>
</li>
</ol>
<p class="paragraph_style_7"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="5">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">5.</span><span style="width: 5px; " class="inline-block"></span>Initialize wolfSSL and the WOLFSSL_CTX. You can use one WOLFSSL_CTX no matter how many WOLFSSL objects you end up creating. Basically you'll just have to load CA certificates to verify the server you're connecting to. Basic initialization looks like:<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">    wolfSSL_Init();<br/></p>
<p class="paragraph_style_4"> <br/></p>
<p class="paragraph_style_4">    WOLFSSL_CTX* ctx;<br/></p>
<p class="paragraph_style_4"> <br/></p>
<p class="paragraph_style_4">    if ( (ctx = wolfSSL_CTX_new(wolfTLSv1_client_method())) == NULL) {<br/></p>
<p class="paragraph_style_4">        fprintf(stderr, &quot;wolfSSL_CTX_new error.\n&quot;);<br/></p>
<p class="paragraph_style_4">        exit(EXIT_FAILURE);<br/></p>
<p class="paragraph_style_4">    }<br/></p>
<p class="paragraph_style_4"> <br/></p>
<p class="paragraph_style_4">    if (wolfSSL_CTX_load_verify_locations(ctx,&quot;./ca-cert.pem&quot;,0) != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_4">        fprintf(stderr, &quot;Error loading ./ca-cert.pem,&quot;<br/></p>
<p class="paragraph_style_4">                        &quot; please check the file.\n&quot;);<br/></p>
<p class="paragraph_style_4">        exit(EXIT_FAILURE);<br/></p>
<p class="paragraph_style_4">    }<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="6">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">6.</span><span style="width: 5px; " class="inline-block"></span>Create the WOLFSSL object after each TCP connect and associate the file descriptor with the session:<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">    // after connecting to socket fd<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">    WOLFSSL* ssl;<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">    if ( (ssl = wolfSSL_new(ctx)) == NULL) {<br/></p>
<p class="paragraph_style_4">        fprintf(stderr, &quot;wolfSSL_new error.\n&quot;);<br/></p>
<p class="paragraph_style_4">        exit(EXIT_FAILURE);<br/></p>
<p class="paragraph_style_4">    }<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_4">    wolfSSL_set_fd(ssl, fd);<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="7">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">7.</span><span style="width: 5px; " class="inline-block"></span>Error checking. Each wolfSSL_read() and wolfSSL_write() call will return the number of bytes written upon success, 0 upon connection closure, and -1 for an error,  just like read() and write(). In the event of an error you can use two calls to get more information about the error:<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">    char errorString[80];<br/></p>
<p class="paragraph_style_4">    int err = wolfSSL_get_error(ssl, 0);<br/></p>
<p class="paragraph_style_4">    wolfSSL_ERR_error_string(err, errorString);<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -30px; " class="full-width">
<p style="text-indent: -30px; " class="paragraph_style_10"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 30px; " class="inline-block"></span>If you are using non blocking sockets, you can test for errno EAGAIN/EWOULDBLOCK or more correctly you can test the specific error code for SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE.<br/></p>
</li>
</ol>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="8">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">8.</span><span style="width: 5px; " class="inline-block"></span>Cleanup. After each WOLFSSL object is done being used you can free it up by calling:<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">    wolfSSL_free(ssl);<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -30px; " class="full-width">
<p style="text-indent: -30px; " class="paragraph_style_10"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 30px; " class="inline-block"></span>When you are completely done using SSL/TLS altogether you can free the WOLFSSL_CTX object by calling:<br/></p>
</li>
</ol>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">    wolfSSL_CTX_free(ctx);<br/></p>
<p class="paragraph_style_4">    wolfSSL_Cleanup();<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -30px; " class="full-width">
<p style="text-indent: -30px; " class="paragraph_style_10"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 30px; " class="inline-block"></span>For an example of a client application using wolfSSL, see the client example located in the &lt;wolfssl_root&gt;/examples/client.c file.<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_2">3.9 Changing a Server Application to Use wolfSSL<span style="line-height: 15px; " class="style_3"><br/></span></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">This section will explain the basic steps needed to add wolfSSL to a server application using the wolfSSL native API. For a client explanation, please see section 3.8.  A more complete walk-through, with example code, is located in the SSL Tutorial in <a title="Docs-wolfssl-manual-11-ssl-tutorial.html" href="Docs-wolfssl-manual-11-ssl-tutorial.html">Chapter 11</a>.<br/></p>
<p class="paragraph_style_3"><br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="1">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">1.</span><span style="width: 5px; " class="inline-block"></span>Follow the instructions above for a client, except change the client method call in step 5 to a server one, so<br/></p>
</li>
</ol>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">    wolfSSL_CTX_new(wolfTLSv1_client_method())<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -30px; " class="full-width">
<p style="text-indent: -30px; " class="paragraph_style_10"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 30px; " class="inline-block"></span>becomes<br/></p>
</li>
</ol>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">    wolfSSL_CTX_new(wolfTLSv1_server_method())<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -30px; " class="full-width">
<p style="text-indent: -30px; " class="paragraph_style_10"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 30px; " class="inline-block"></span>or even<br/></p>
</li>
</ol>
<p class="paragraph_style_3"> <br/></p>
<p class="paragraph_style_4">    wolfSSL_CTX_new(wolfSSLv23_server_method())<br/></p>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -30px; " class="full-width">
<p style="text-indent: -30px; " class="paragraph_style_10"><span style="font-size: 0px; position: relative; top: -7px; " class="Bullet"></span><span style="width: 30px; " class="inline-block"></span>To allow SSLv3 and TLSv1+ clients to connect to the server.<br/></p>
</li>
</ol>
<p class="paragraph_style_3"> <br/></p>
<ol>
<li style="line-height: 15px; padding-left: 30px; text-indent: -15px; " class="full-width" value="2">
<p style="text-indent: -15px; " class="paragraph_style_6"><span style="font-size: 12px; " class="Bullet">2.</span><span style="width: 5px; " class="inline-block"></span>Add the server's certificate and key file to the initialization in step 5 above:<br/></p>
</li>
</ol>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_4">    if (wolfSSL_CTX_use_certificate_file(ctx,&quot;./server-cert.pem&quot;,<br/></p>
<p class="paragraph_style_4">                                     SSL_FILETYPE_PEM) != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_4">        fprintf(stderr, &quot;Error loading ./server-cert.pem,&quot;<br/></p>
<p class="paragraph_style_4">                        &quot; please check the file.\n&quot;);<br/></p>
<p class="paragraph_style_4">        exit(EXIT_FAILURE);<br/></p>
<p class="paragraph_style_4">    }<br/></p>
<p class="paragraph_style_4"> <br/></p>
<p class="paragraph_style_4">    if (wolfSSL_CTX_use_PrivateKey_file(ctx,&quot;./server-key.pem&quot;,<br/></p>
<p class="paragraph_style_4">                                          SSL_FILETYPE_PEM) != SSL_SUCCESS) {<br/></p>
<p class="paragraph_style_4">        fprintf(stderr, &quot;Error loading ./server-key.pem,&quot;<br/></p>
<p class="paragraph_style_4">                        &quot; please check the file.\n&quot;);<br/></p>
<p class="paragraph_style_4">        exit(EXIT_FAILURE);<br/></p>
<p class="paragraph_style_4">    }<br/></p>
<p class="paragraph_style_4"><br/></p>
<p class="paragraph_style_3">It is possible to load certificates and keys from buffers as well if there is no filesystem available.  In this case, see the wolfSSL_CTX_use_certificate_buffer() and wolfSSL_CTX_use_PrivateKey_buffer() API documentation for more information.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p style="padding-bottom: 0pt; " class="paragraph_style_3">For an example of a server application using CyaSSL, see the server example located in the &lt;wolfssl_root&gt;/examples/server.c file.</p>
</div>
<div style="clear: both; height: 0px; line-height: 0px; " class="tinyText"> </div>
</div>
</div>
<div id="id3" style="height: 24px; left: 193px; position: absolute; top: 122px; width: 268px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_268_24" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_11"><a class="class1" title="Docs.html" href="Docs.html">Docs</a> <span class="style_8">-&gt;</span> <span class="style_9">wolfSSL Manual</span></p>
</div>
</div>
</div>
<div style="height: 1px; width: 698px;  height: 1px; left: 37px; position: absolute; top: 220px; width: 698px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 698px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_1.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 698px; "/>
</div>
</div>
<div style="height: 37px; width: 545px;  height: 37px; left: 191px; position: absolute; top: 80px; width: 545px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 545px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_2.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 545px; "/>
</div>
</div>
<div id="id4" style="height: 25px; left: 200px; position: absolute; top: 84px; width: 43px; z-index: 1; " class="style_SkipStroke_2 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_43_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_12"><a class="class2" title="Home.html" href="Home.html">Home</a></p>
</div>
</div>
</div>
<div id="id5" style="height: 25px; left: 365px; position: absolute; top: 84px; width: 72px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_72_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_13"><a class="class3" title="https://wolfssl.com/wolfSSL/download/downloadForm.php" href="https://wolfssl.com/wolfSSL/download/downloadForm.php">Download</a></p>
</div>
</div>
</div>
<div id="id6" style="height: 25px; left: 439px; position: absolute; top: 84px; width: 59px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_59_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_13"><a class="class4" title="License.html" href="License.html">License</a></p>
</div>
</div>
</div>
<div id="id7" style="height: 25px; left: 499px; position: absolute; top: 84px; width: 44px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_44_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_13"><a class="class5" title="Blog/Blog.html" href="Blog/Blog.html">Blog</a></p>
</div>
</div>
</div>
<div id="id8" style="height: 25px; left: 589px; position: absolute; top: 84px; width: 80px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_80_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_13"><a class="class6" title="Community.html" href="Community.html">Community</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 245px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_3.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 296px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_4.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 363px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_5.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 438px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_6.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 498px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_7.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 589px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_8.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id9" style="height: 25px; left: 671px; position: absolute; top: 84px; width: 61px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_61_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_13"><a class="class7" title="Contact.html" href="Contact.html">Contact</a></p>
</div>
</div>
</div>
<div id="id10" style="height: 25px; left: 249px; position: absolute; top: 84px; width: 44px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_44_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_12"><a class="class8" title="About.html" href="About.html">About</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 670px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_9.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id11" style="height: 25px; left: 298px; position: absolute; top: 84px; width: 63px; z-index: 1; " class="style_SkipStroke_2 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_63_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_13"><a class="class9" title="Products.html" href="Products.html">Products</a></p>
</div>
</div>
</div>
<div id="id12" style="height: 25px; left: 549px; position: absolute; top: 84px; width: 41px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_41_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_12"><a class="class10" title="Docs.html" href="Docs.html">Docs</a></p>
</div>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 545px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_10.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id13" style="height: 27px; left: 634px; position: absolute; top: 224px; width: 102px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_102_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_14"><a class="class11" title="Docs-wolfssl-manual-4-features.html" href="Docs-wolfssl-manual-4-features.html">Next Chapter</a></p>
</div>
</div>
</div>
<div id="id14" style="height: 25px; left: 35px; position: absolute; top: 224px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_15"><a class="class12" title="Docs-wolfssl-manual-2-building-wolfssl.html" href="Docs-wolfssl-manual-2-building-wolfssl.html">Previous Chapter</a></p>
</div>
</div>
</div>
<div id="id15" style="height: 27px; left: 59px; position: absolute; top: 190px; width: 196px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_196_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_16"><a class="class13" title="https://www.wolfssl.com/documentation/wolfSSL-Manual.pdf" href="https://www.wolfssl.com/documentation/wolfSSL-Manual.pdf">Download wolfSSL Manual (PDF)</a></p>
</div>
</div>
</div>
<div style="height: 22px; width: 22px;  height: 22px; left: 33px; position: absolute; top: 191px; width: 22px; z-index: 1; " class="tinyText style_SkipStroke_1">
<img src="Docs-wolfssl-manual-3-getting-started_files/PDF.png" alt="" style="border: none; height: 22px; width: 22px; "/>
</div>
<div id="id16" style="height: 25px; left: 323px; position: absolute; top: 224px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_17"><a title="Docs-wolfssl-manual-toc.html" href="Docs-wolfssl-manual-toc.html">Table of Contents</a></p>
</div>
</div>
</div>
<div style="height: 16px; width: 20px;  height: 16px; left: 706px; position: absolute; top: 51px; width: 20px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 20px; ">
<img src="Docs-wolfssl-manual-3-getting-started_files/shapeimage_11.png" alt="" style="height: 16px; left: 0px; position: absolute; top: 0px; width: 20px; "/>
</div>
</div>
<div style="height: 19px; width: 19px;  height: 19px; left: 707px; position: absolute; top: 25px; width: 19px; z-index: 1; " class="tinyText style_SkipStroke_1">
<img src="Docs-wolfssl-manual-3-getting-started_files/United%20Kingdom(Great%20Britain).png" alt="" style="border: none; height: 19px; width: 19px; "/>
</div>
<div id="id17" style="height: 23px; left: 328px; position: absolute; top: 48px; width: 258px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_258_23" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_18">Questions? +1 (425) 245-8247</p>
</div>
</div>
</div>
<div style="height: 19px; width: 19px;  height: 19px; left: 685px; position: absolute; top: 25px; width: 19px; z-index: 1; " class="tinyText style_SkipStroke_1">
<a href="http://www.wolfssl.jp/" title="http://www.wolfssl.jp"><img src="Docs-wolfssl-manual-3-getting-started_files/japan.png" alt="" style="border: none; height: 19px; width: 19px; "/></a>
</div>
<div id="id18" style="height: 28px; left: 593px; position: absolute; top: 44px; width: 119px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_119_28" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_19"><a class="class14" title="https://www.wolfssl.com/forums" href="https://www.wolfssl.com/forums">Support <span class="style_10">Forums</span></a></p>
</div>
</div>
</div>
<div style="height: 121px; width: 155px;  height: 121px; left: 32px; position: absolute; top: 5px; width: 155px; z-index: 1; " class="tinyText style_SkipStroke_1">
<a href="Home.html" title="Home.html"><img src="Docs-wolfssl-manual-3-getting-started_files/wolfssl_logo.png" alt="" style="border: none; height: 121px; width: 156px; "/></a>
</div>
<div style="height: 8956px; line-height: 8956px; " class="spacer"> </div>
</div>
<div style="height: 100px; margin-left: 0px; position: relative; width: 770px; z-index: 15; " id="footer_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id19" style="height: 27px; left: 634px; position: absolute; top: 27px; width: 102px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_102_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_14"><a class="class15" title="Docs-wolfssl-manual-4-features.html" href="Docs-wolfssl-manual-4-features.html">Next Chapter</a></p>
</div>
</div>
</div>
<div id="id20" style="height: 25px; left: 35px; position: absolute; top: 27px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_15"><a class="class16" title="Docs-wolfssl-manual-2-building-wolfssl.html" href="Docs-wolfssl-manual-2-building-wolfssl.html">Previous Chapter</a></p>
</div>
</div>
</div>
<div id="id21" style="height: 25px; left: 323px; position: absolute; top: 27px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_17"><a title="Docs-wolfssl-manual-toc.html" href="Docs-wolfssl-manual-toc.html">Table of Contents</a></p>
</div>
</div>
</div>
<div id="id22" style="height: 29px; left: 35px; position: absolute; top: 65px; width: 701px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_701_29" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_20">Copyright 2017 wolfSSL Inc.  All rights reserved.</p>
</div>
</div>
</div>
</div>
</div>
</div>
 </body>

<!-- Mirrored from www.wolfssl.com/wolfSSL/Docs-wolfssl-manual-3-getting-started.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:30:16 GMT -->
</html>
